<script type="text/javascript">
	$(document).ready(function(){
		$('#cash').bind('keypress', function(e){
			if(e.keyCode==13){
				$.ajax({
				  data: {total_pembayaran: $('#total_pembayaran').val() , cash: $('#cash').val(), penjualanid: $('#penjualanid').val()},
				  method: "get", 
				  url: '<%= j url_for(:controller => "penjualans", :action => "menyimpan_penjualan") %>',
				});
			}
		});
		$('input#close').bind('keypress', function(e){
			if(e.keyCode==13){
				$('#daftar_penjualan').html('')
				$('#total_harga').html('<h1>Rp.</h1>');
				$('tr#empty-row').show();
				$('#myModal').modal('hide');
				$('#jumlah').val('');
				$('#barcodescan').focus(); 
				$('#close').hide();
			}
		});
	});
</script>

<div id="alert_pembayaran" class="alert fade in hide">
	<button type="button" class="close" data-dismiss="alert">&times;</button>
	<strong>Peringatan</strong> Uang yang anda masukkan tidak cukup.
</div>

<div class="row">
	<div id="pembayaran" class="">
		<div class="span4">
			Cash <br /><%= text_field_tag "cash", nil, :class => "span3", :style => "margin-top:5px;" %>
		</div>
		<div id="total_biaya" class="span2">
			Total <br /> <h1>Rp.</h1>
		</div>	
	</div>
	<div id="price_show" class=" span 6 hide">
		<h1>Kembalian</h1> <h1 id="kembalian"> </h1> 	
	</div>
</div>